class BaseBackend(object):
    def __init__(self, config, keyName):
        self._config = config
        self._keyName = keyName
        self.connect()

    def connect(self):
        raise NotImplemented()

    def disconnect(self):
        raise NotImplemented()

    def getByKey(self, documentcls, key):
        raise NotImplemented()
    
    def get(self, documentcls, criterias):
        raise NotImplemented()
    
    def insert(self, document):
        raise NotImplemented()

    def update(self, document):
        raise NotImplemented()

    def delete(self, document):
        raise NotImplemented()
        